package com.platform.wechat.mapper;

import com.platform.wechat.entity.Doctor;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;
@Repository
public interface DoctorMapper {
    
    /** 
    * @Description: 根据id查询医生信息（包括医院名称科室名称）
    * @Param: []
    * @return: com.platform.wechat.entity.Doctor
    * @Author: YP
    * @Date: 2021/8/2
    * @Time: 10:18
    */
    Doctor selectDoctorByIdToReg(Integer doctorId);

    /**
    * @Description: 根据时间查询医生信息
    * @Param: [time]
    * @return: java.util.List<com.platform.wechat.entity.Doctor>
    * @Author: YP
    * @Date: 2021/7/31
    * @Time: 20:06
    */
    List<Doctor> selectDoctorByWorkingTime(@Param("time") String time);

    int deleteByPrimaryKey(Integer doctorId);

    int insert(Doctor record);

    int insertSelective(Doctor record);

    Doctor selectByPrimaryKey(Integer doctorId);

    //根据时间查询医生
    List<Doctor> selectDoctorByTime(@Param("officesId") Integer officesId, @Param("hospitalId") Integer hospitalId);

    //更具医院，科室，医生职称，姓名查询
    List<Doctor> selectDoctor(@Param("hospitalName") String hospitalName, @Param("officesName") String officesName, @Param("doctorTitle") String doctorTitle, @Param("doctorName") String doctorName);

    int updateByPrimaryKeySelective(Doctor record);

    int updateByPrimaryKey(Doctor record);

    /**
    * @Description: 根据医院Id和科室Id查医生集合
    * @Param: [hospitalId, officesId]
    * @return: java.util.List<com.platform.wechat.entity.Doctor>
    * @Author: guopeixin
    * @Date: 2021/8/2 21:56
    */
    List<Doctor> selectDoctorByHosAndOffId(@Param("hospitalId") Integer hospitalId, @Param("officesId") Integer officesId);


    /** 
    * @Description: 根据医院Id和科室Id查医生集合,医生ID查工作时间
    * @Param: [hospitalId, officesId, doctorId] 
    * @return: java.util.List<com.platform.wechat.entity.Doctor> 
    * @Author: guopeixin
    * @Date: 2021/8/3 13:59
    */
    List<Doctor> selectDoctorByHosAndOffIdAndDoctorId(@Param("hospitalId") Integer hospitalId, @Param("officesId") Integer officesId, @Param("doctorId") Integer doctorId);

    /** 
    * @Description: 时间段中有工作安排的医生
    * @Param: [hospitalId, officesId, doctorId] 
    * @return: java.util.List<com.platform.wechat.entity.Doctor> 
    * @Author: guopeixin
    * @Date: 2021/8/3 14:46
    */
    List<Doctor> selectWorkDoctors(@Param("hospitalId") Integer hospitalId, @Param("officesId") Integer officesId, @Param("doctorId") Integer doctorId);

}